import '../../dio_wrapper.dart';

class HeaderInterceptor extends Interceptor {
  @override
  void onRequest(RequestOptions options, RequestInterceptorHandler handler) {
    Map<String, dynamic>? commonHeaders = dio.getHeader?.call();
    if (null != commonHeaders) {
      options.headers.addAll(commonHeaders);
    }
    super.onRequest(options, handler);
  }
}
